package xyz.maxwells.bigdata.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyz.maxwells.bigdata.dao.MyCollectReposity;
import xyz.maxwells.bigdata.domain.data.MyCollect;
import xyz.maxwells.bigdata.service.MyCollectService;

import java.util.List;

/**
 * Created by wuzusheng on 2018/5/13.
 */
@Service
public class MyCollectServiceImpl implements MyCollectService{
    @Autowired
    private MyCollectReposity dao;
    @Override
    public List<MyCollect> findByUserName(String userName) {
        return dao.findByUserName(userName);
    }

    @Override
    public void update(MyCollect myCollect) {
        dao.save(myCollect);
    }

    @Override
    public MyCollect findById(Long id) {
        return dao.findOne(id);
    }

    @Override
    public void delete(Long id) {
        dao.delete(id);
    }
}
